package com.yunhe.portal.service;

import com.yunhe.common.exception.ArgumentErrorException;
import com.yunhe.common.model.mybatis.PageResult;
import com.yunhe.portal.domain.DataBannerInfo;
import com.yunhe.portal.model.BannerInfoQueryCondition;
import com.yunhe.portal.model.NewsAndNotice;

import java.util.List;

/**
 * @ClassName: DataBannerInfoService
 * @Description:
 * @author: GongDaCheng
 * @Date: 9:56 2021/10/22
 */
public interface DataBannerInfoService {

    /**
     * @Description 新增Banner
     * @Param DataBannerInfo dataBannerInfo
     * @Return int
     * @Date 2021/10/22 9:57
     */
    int createDataBannerInfo (DataBannerInfo dataBannerInfo) throws ArgumentErrorException;

    /**
     * @Description 删除Banner
     * @Param Long id
     * @Return int
     * @Date 2021/10/22 9:57
     */
    int deleteDataBannerInfo(Long id);

    /**
     * @Description 更新Banner
     * @Param DataBannerInfo dataBannerInfo
     * @Return int
     * @Date 2021/10/22 9:57
     */
    int updateDataBannerInfo(DataBannerInfo dataBannerInfo);

    /**
     * @Description 根据主键 id 查询
     * @Param Long id
     * @Return DataBannerInfo
     * @Date 2021/10/22 9:57
     */
    DataBannerInfo findDataBannerInfoById(Long id);

    /**
     * @Description 置顶banner
     * @Param Long id
     * @Return
     * @Date 2021/10/22 10:58
     */
    void setTop(Long id) throws ArgumentErrorException;

    /**
     * @Description Web根据条件筛选banner
     * @Param BannerInfoQueryCondition bannerInfoQueryCondition
     * @Return PageResult
     * @Date 2021/10/22 11:43
     */
    PageResult getBannerByConditionWeb(BannerInfoQueryCondition bannerInfoQueryCondition) throws ArgumentErrorException;

    /**
     * @Description App前台获取前三个Banner
     * @Param Long stationId
     * @Return List<DataBannerInfo>
     * @Date 2021/10/22 15:15
     */
    List<DataBannerInfo> findAppBanner(Long stationId);

    /**
     * @Description 小程序前台获取前三个Banner
     * @Param Long stationId
     * @Return List<DataBannerInfo>
     * @Date 2021/10/22 15:15
     */
    List<DataBannerInfo> findWeChatBanner(Long stationId);

    /**
     * @Description 获取新闻和公告列表
     * @Param String keyword, String type
     * @Return List<NewsAndNotice>
     * @Date 2021/10/22 17:03
     */
    List<NewsAndNotice> getNewsAndNoticeByKeyword(String keyword, String type, String noticeType);
}
